<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>案例1</title>
    <style>
        a {
            /* 1.a标签是行元素且有五个，需转换为行内块元素 */
            display: inline-block;
            /* 2.去除下划线 */
            text-decoration: none;
            /* 3.添加颜色，宽高，和背景色 */
            color: aliceblue;
            width: 100px;height: 50px;
            background-color: red;
            /* 4.使文字居中 */
            text-align: center;
            /* 5.让文字与行内块元素水平垂直居中；将行高设置与元素高一致即可 */
            line-height: 50px;
        }
        a:hover {
            background-color: yellow;
        }
    </style>
</head>
<body>
    <a href="">导航1</a>
    <a href="">导航2</a>
    <a href="">导航3</a>
    <a href="">导航4</a>
    <a href="">导航5</a>
</body>
</html>